package itheima.d04;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test {
    public static void main(String[] args) {
        Map<Student,String> map =new HashMap<>();
        map.put(new Student("张三",18,"男"),"山东");
        map.put(new Student("王五",19,"女"),"北京");
        map.put(new Student("赵六",21,"男"),"上海");
        map.put(new Student("胡一天",21,"男"),"广州");
        map.put(new Student("胡一天",21,"男"),"广州");

//        Set<Map.Entry<Student, String>> entries = map.entrySet();
//        for (Map.Entry<Student, String> entry : entries) {
//            Student key = entry.getKey();
//            String value = entry.getValue();
//            System.out.println(key+"--->"+value);


            map.forEach((k,v)-> System.out.println(k+"--->"+v));
        }
    }


